#!/usr/bin/env bash
set -e
sudo git pull origin master
mvn clean package
PID=$(sudo netstat -anp|grep 9090|awk '{printf $7}'|cut -d/ -f1)
if [[ $PID -gt 3 ]];then
	echo "kill old process="$PID
	sudo kill -9 $PID
fi
cd target
sudo `which java` -jar MU_REST.jar &